﻿@model DiemTichLuyModels.Object.SanPham
@{
    ViewBag.Title = "Sua san pham";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var loais = (SelectList)ViewBag.LoaiSanPham;
}
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.js"></script>
<h2>ThemSanPham</h2>

@using (Html.BeginForm()) { 
    <fieldset>
        @Html.HiddenFor(m=>m.ID)
        @Html.LabelFor(m=>m.Name)
        @Html.TextBoxFor(m=>m.Name)
        @Html.ValidationMessageFor(m=>m.Name)<br />
        @Html.LabelFor(m=>m.LoaiSanPhamID)
        @Html.DropDownListFor(m=>m.LoaiSanPhamID,loais)
        <input name="giasanpham" value="10" />
        <input type="submit" value="thêm" />
    </fieldset>
}